package com.ebraga.trackerclub.android.dao.api.webservice;

import java.util.Collection;

import com.ebraga.trackerclub.android.exception.dao.BackofficeConnectionWebServicesException;
import com.ebraga.trackerclub.android.exception.dao.BackofficeIllegalArgumentDaoException;
import com.ebraga.trackerclub.android.exception.dao.BackofficeInvalidURLWebServicesException;
import com.ebraga.trackerclub.android.exception.dao.BackofficeWebServicesException;
import com.ebraga.trackerclub.rest.dao.entity.webservice.PositionWSEntity;

/**
 * Provides methods send Position data to web server.
 */
public interface PositionWSDao extends EntityWSDao<PositionWSEntity> {

	/**
	 * Sends to the web server a list of positions to be persisted. 
	 * 
	 * @param positionList a position list to be persisted.
	 * @return <code>true</code> if the list is fully persisted, otherwise the fully list is not persisted.   
	 * @throws BackofficeInvalidURLWebServicesException if the URL is invalid.
	 * @throws BackofficeConnectionWebServicesException if a connection error.
	 * @throws BackofficeWebServicesException if occurs another error.
	 */
	@Override
	boolean insert(Collection<PositionWSEntity> positionList) throws BackofficeWebServicesException, BackofficeInvalidURLWebServicesException, 
		BackofficeConnectionWebServicesException, BackofficeIllegalArgumentDaoException;
}
